package com.hxtec.polaris.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.*;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Caps
 * @date 2019/12/5
 */
@ApiModel(value = "com.hxtec.polaris.entity.ShopOrderItem")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
@Table(name = "shop_order_item")
public class ShopOrderItem implements Serializable {
    @Id
    @Column(name = "id")
    @GeneratedValue(generator = "JDBC")
    @ApiModelProperty(value = "null")
    private Integer id;

    /**
     * 订单id
     */
    @Column(name = "order_id")
    @ApiModelProperty(value = "订单id")
    private Integer orderId;

    /**
     * 商品spu
     */
    @Column(name = "product_id")
    @ApiModelProperty(value = "商品spu")
    private Integer productId;

    /**
     * 商品图片
     */
    @Column(name = "product_pic")
    @ApiModelProperty(value = "商品图片")
    private String productPic;

    /**
     * 商品名称
     */
    @Column(name = "product_name")
    @ApiModelProperty(value = "商品名称")
    private String productName;

    /**
     * 商品介绍
     */
    @Column(name = "product_introduce")
    @ApiModelProperty(value = "商品介绍")
    private String productIntroduce;

    /**
     * 原价
     */
    @Column(name = "product_price")
    @ApiModelProperty(value = "原价")
    private BigDecimal productPrice;

    /**
     * 折后价
     */
    @Column(name = "discount_price")
    @ApiModelProperty(value = "折后价")
    private BigDecimal discountPrice;

    /**
     * 购买数量
     */
    @Column(name = "product_quantity")
    @ApiModelProperty(value = "购买数量")
    private Integer productQuantity;

    /**
     * 商品sku编号
     */
    @Column(name = "product_sku_id")
    @ApiModelProperty(value = "商品sku编号")
    private Integer productSkuId;

    /**
     * 商品分类id
     */
    @Column(name = "product_category_id")
    @ApiModelProperty(value = "商品分类id")
    private Integer productCategoryId;

    /**
     * 商品销售属性:[{"key":"颜色","value":"颜色"},{"key":"容量","value":"4G"}]
     */
    @Column(name = "product_attr")
    @ApiModelProperty(value = "商品销售属性")
    private String productAttr;

    /**
     * 权重
     */
    @Column(name = "weight")
    @ApiModelProperty(value = "权重")
    private Double weight;

    /**
     * 是否被删除（Y是/N否）
     */
    @Column(name = "is_delete")
    @ApiModelProperty(value = "是否被删除（Y是/N否）")
    private String isDelete;

    private static final long serialVersionUID = 1L;

}